package fei.zhou.springboot4.business.config.listener;

import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 描述该类- JPA
 *
 * @author zhoufei
 * @class: ListenerConfig
 * @date 2021/1/20 11:00
 * @Verson 1.0 -2021/1/20 11:00
 * @see
 */
@Configuration
public class ListenerConfig {
    
    // 注册监听
    @Bean
    public ServletListenerRegistrationBean myListener() {
        ServletListenerRegistrationBean<MyListener> registrationBean = new ServletListenerRegistrationBean<>(
                new MyListener());
        return registrationBean;
    }
}